<template>
  <div>
    <div class="Weekend-title">周末去哪儿</div>
    
    <ul>
      <li class="item border-bottom" v-for="i in weekendList" :key="i.id">
        <div class="item-img-wrapper">
          <img class="item-img" :src="i.imgUrl" alt="">
        </div>
        
        <div class="item-info">
          <p class="item-title">{{i.title}}</p>
          <p class="item-desc">{{i.desc}}</p>         
        </div>
      </li>
    </ul>

  </div>
</template>

<script>
export default {
  name: "Weekend",
  props: ["weekendLists"],

  data() {
    return {
      // weekendList: [
      //   {
      //     _id: "01", 
      //     imgUrl: "https://img1.qunarzz.com/sight/p0/1605/99/994a4f48dd1ee9fa90.water.jpg_256x160_714adae5.jpg",
      //     title: "荣国府",
      //     desc: "众多影视剧曾在此取景",
      //   },     
      //   {
      //     _id: "02", 
      //     imgUrl: "https://img1.qunarzz.com/sight/p0/1605/99/994a4f48dd1ee9fa90.water.jpg_256x160_714adae5.jpg",
      //     title: "荣国府",
      //     desc: "众多影视剧曾在此取景",
      //   },    
      // ]
      weekendList: this.weekendLists,
    }
  },
}
</script>

<style scoped>
  /* 标题 */
  .Weekend-title {
    line-height: 40px;
    background-color: #eee;
    text-indent: 10px;
    
    margin-top: 10px;
  }


  .item {
    display: flex;
    flex-direction: column;
  }

  .item .item-img-wrapper {
    flex: 1;
  }
  .item .item-img-wrapper .item-img {
    width: 100%;
  }


  .item .item-info {
    flex: 1;

    padding: 5px;
    padding-bottom: 10px;

    min-width: 0;
  }
  .item .item-info .item-title {
    font-weight: 560;
    
    line-height: 27px;
    font-size: 15px;

    /* 文字溢出 */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .item .item-info .item-desc {
    line-height: 20px;
    color: rgb(79, 79, 79);    
  }
</style>